package com.ldn.basic.utils.tencent;

import lombok.Data;
import lombok.Getter;

/**
 * @author 李大牛家的牛 (scafel@163.com)
 * @createDate 2024/8/25 - 16:33
 * @description ...
 **/
@Data
public class OrderDeliveryPacket {


    private String appid;
    private String secret;
    private long order_number_type = 1;
    private String mchid;
    private String out_trade_no;
    private LOGISTICS_TYPE logistics_type = LOGISTICS_TYPE.VIRTUAL_LOGISTICS;
    private DELIVERY_TYPE delivery_mode = DELIVERY_TYPE.UNIFIED_DELIVERY;
    private boolean is_all_delivered = true;
    private String item_desc;
    private String upload_time;
    private String openid;

}

@Getter
enum DELIVERY_TYPE{
    UNIFIED_DELIVERY("1", "统一发货"),
    SPLIT_DELIVERY("2", "分拆发货"),
    ;

    private String code;
    private String desc;

    DELIVERY_TYPE(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

}

@Getter
enum LOGISTICS_TYPE{
    PHYSICAL_LOGISTICS("1", "实体物流配送采用快递公司进行实体物流配送形式"),
    // 同城配送
    CITY_LOGISTICS("2", "同城配送"),
    // 虚拟商品
    VIRTUAL_LOGISTICS("3", "虚拟商品，虚拟商品，例如话费充值，点卡等，无实体配送形式"),
    // 用户自提
    USER_LOGISTICS("4", "用户自提"),
    ;

    private String code;
    private String desc;

    LOGISTICS_TYPE(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

}